<!doctype html>
<html xml:lang="zh-cn" lang="zh-cn">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>{$info.title} - {$config.system_name}</title>
<meta name="renderer" content="webkit" />
<meta name="keywords" content="{$config.index_keywords}"/>
<meta name="description" content="{$info.description|raw}"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{include file="common:column" /}
<link href="{$config.microblog}/static/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css" rel="stylesheet" type="text/css" />   
<script type="text/javascript" src="{$config.microblog}/static/ueditor/third-party/SyntaxHighlighter/shCore.js"></script>  
<script type="text/javascript">      
SyntaxHighlighter.all();       
</script>
<style>
</style>
</head>
<body>
<div class="trm-mode-swich-animation-frame">
    <div class="trm-mode-swich-animation">
        <i class="layui-icon layui-icon-light-b"></i>
        <div class="trm-horizon"></div>
        <i class="layui-icon layui-icon-b-fill"></i>
    </div>
</div>
<div class="site-wrapper" id="trm-scroll-container">
  <div class="main-overlay"></div>
  <header class="header-default">
{include file="common:header" /}
  </header>
  <section class="single-cover data-bg-image" data-bg-image="{$info.thumb}">
    <div class="container-xl">
      <div class="cover-content post">
        <nav aria-label="breadcrumb">
          <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="{$config.microblog}/">首页</a></li>
            <li class="breadcrumb-item"><a href="../news/list-{$cid}.html">{$currentCategoryName}</a></li>
            <li class="breadcrumb-item active" aria-current="page">{$info.title}</li>
          </ol>
        </nav>
        <div class="post-header">
          <h1 class="title mt-0 mb-3">{$info.title}</h1>
          <ul class="meta list-inline mb-0">
            <li class="list-inline-item"><a href="{$config.microblog}/about.html"><img src="{$config.portrait}" class="author yuanava" alt="author"/>{$config.linkman}</a></li>
            <li class="list-inline-item">{$info.create_time|date='M-d-Y H:i A'}</li>
            <!--<li class="list-inline-item"><a>本站文章不在展示点击量</a></li>-->
          </ul>
        </div>
      </div>
    </div>
  </section>
  <section class="main-content">
    <div class="container-xl">
	  <div class="row gy-4">
	    <div class="col-lg-8">
          <div class="post post-single">
            <div class="post-content clearfix">
              {eq name="$info.topped" value="1"}<div class="pgood"></div>{/eq}{eq name="$info.recommended" value="1"}<div class="recommended"></div>{/eq}
              <h4>{$info.description|raw}</h4>
              {$info.content|raw}
		    </div></br>
            <?php $arr=explode(',', $info['keywords']);
            foreach ($arr as $k=>$v) {
              echo "<a href='".($config['microblog'])."/search.html?keyword=$v' class='tag'>#$v</a>";
            }?>
            <h4>文章来自：{$info.source}</h4>
		    <div class="post-bottom">
			  <div class="row d-flex align-items-center">
		        <div class="col-md-12 col-12 text-center text-md-start">
			    {notempty name="prev"}<a href="{$prev.url}"><span class="tag">上一篇：{$prev.title}</span></a>{/notempty}<br />
                {notempty name="next"}<a href="{$next.url}"><span class="tag">下一篇：{$next.title}</span></a>
                {/notempty}</div>
			  </div>
		    </div>
		  <div class="post-bottom"></div>
          </div>
		<div class="spacer" data-height="20"></div>
{include file="common:head" /}
		<div class="spacer" data-height="30"></div>
		<div class="section-header">
		  {egt name="$count" value="1"}<h3 class="section-title">当前文章有 <span style="color: #ff0000;" class="ue_t">{$count|raw}</span> 条评论</h3>
		  <img src="{$config.default_url}/assets/images/wave.svg" class="wave" alt="wave" />
		  <h6>网络信息过于复杂，请勿相信任何非认证用户的评论或者留言，请认准认证(<span class="renz-V" lay-tips="站长"></span>)图标</h6>
		  <div class="spacer" data-height="30"></div>
		  <div class="comments bordered padding-30 rounded" id="main">
            <ul class="comments">
		      {volist name="commlist" id="vo"}<li class="comment rounded" id="content-{$vo.id}">
				<div class="thumb">
				  <img src="{$vo.avatar}" class="messanava" alt="{$vo.nickname}" />{eq name="$vo['user_id']" value="1"}<span class="thumb-V" lay-tips="站长"></span>{else/}{/eq}</div>
				<div class="details" id="{$vo.id}">
                  <div class="reply">
                    <a href="#content-{$vo.id}" onclick="contentReply({$vo.id},this)">回复留言</a>
			      </div>
				  <h4 class="name"><a>{$vo.nickname}</a></h4>
				  <span class="date"><i class="layui-icon layui-icon-time-o"></i> {$vo.create_time|date="M-d-Y H:i A"} <i class="layui-icon layui-icon-location"></i> {$vo.ipmess}</span>
				  <p><?php echo preg_replace("/\[F(([0-9]?[0-9])|99)\]/",'<img src="'.($config['microblog']).'/static/image/emoji/f$1.png" class="faces" alt="faces" style="height: 2em; max-height: 2em;"/>',comcontent($vo['content'])); ?></p>
				  <div class="sign-ob"><?php echo preg_replace("/\[faimg=?\]*(.*?)(\[\/faimg)?\]/",'<img class="comment-img" src="$1"/>',comcontent($vo['useragent'])); ?></div>
				</div>
			  </li>
              {if condition="$vo['children'] neq ''"}{volist name="vo.children" id="vo2"}<li class="comment child rounded">
				<div class="thumb">
				  <img src="{$vo2.avatar}" class="messanava" alt="{$vo2.nickname}" />{eq name="$vo2['user_id']" value="1"}<span class="thumb-V" lay-tips="站长"></span>{else/}{/eq}</div>
				<div class="details" id="{$vo2.id}">
				  <h4 class="name"><a>{$vo2.nickname}<span style="color: #ff0000;" class="ue_t"> @ </span>{$vo.nickname}</a></h4>
				  <span class="date"><i class="layui-icon layui-icon-time-o"></i> {$vo2.create_time|date="M-d-Y H:i A"} <i class="layui-icon layui-icon-location"></i> {$vo2.ipmess}</span>
				  <p><?php echo preg_replace("/\[F(([0-9]?[0-9])|99)\]/",'<img src="'.($config['microblog']).'/static/image/emoji/f$1.png" class="faces" alt="faces" style="height: 2em; max-height: 2em;"/>',comcontent($vo2['content'])); ?></p>
				  <div class="sign-ob"><?php echo preg_replace("/\[faimg=?\]*(.*?)(\[\/faimg)?\]/",'<img class="comment-img" src="$1"/>',comcontent($vo2['useragent'])); ?></div>
				</div>
			  </li>{/volist}{/if}{/volist}
			  
            </ul>
		  </div>
		  <nav>
		    <ul class="pagination justify-content-center">
			  {$page|raw}
			  
		    </ul>
		  </nav>
		  {else/}<h3 class="section-title">文章还没有评论，快来抢占沙发吧！</h3>{/egt}
		</div>
        <div class="section-header">
          <h3 class="section-title">为了能及时反馈您的问题，请您留下真实的邮箱地址或QQ号以便我们能第一时间联系您！</h3>
          <img src="{$config.default_url}/assets/images/wave.svg" class="wave" alt="wave" />
          <h6><font color=#ff0000>本站已启用违法违规关键词屏蔽，评论不易，且行且珍惜！</font></h6>
        </div>
        <div id="content">
          <div id="content-place">
            <div class="content-post" id="content-post">
              <div class="container-xl">
                <form id="contactForm" class="contact-form" method="post">
                  <input type="hidden" name="pid" value="{$info.id}">
                  <div class="messages"></div>
{include file="common:message" /}
                  <button type="submit" onclick="editsong();return false;" value="Submit" class="btn btn-default">提交留言</button>
                </form>
                <div style="margin-bottom:20px;"></div>
                </div>
              </div>
            </div>
          </div>
        </div> 
{include file="common:hot" /}
	  </div>
    </div>
  </section>
{include file="common:footer" /}
{include file="common:columnjs" /}
  <script>
    function ajaxPost(){
        var formData = $("#contactForm").serialize();
        $.ajax({
            type:"post",
            url:"{:url('/index/messages/add')}",  //数据传输的控制器方法
            data:formData,//这里data传递过去的是序列化以后的字符串
            success:function(data){
                if (data.code === 0) {
                    layer.msg(data.msg, {offset:'50%',icon: 1});
                    setTimeout(function () {
                            // window.parent.location.reload()
                        },
                        1000);
                } else {
                    layer.msg(data.msg, {offset:'50%',icon: 5});
                }
            }
        });
        return false;
    };
    $(function(){
        SyntaxHighlighter.highlight();
        $("table.syntaxhighlighter").each(function () {
            if (!$(this).hasClass("nogutter")) {
                var $gutter = $($(this).find(".gutter")[0]);
                var $codeLines = $($(this).find(".code .line"));
                $gutter.find(".line").each(function (i) {
                    $(this).height($($codeLines[i]).height());
                    $($codeLines[i]).height($($codeLines[i]).height());
                });
            }
        });
    });
  </script>
</body>
</html>